package com.wing.cabinet.model.response;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.cabinet.model.entity.UseInventoryUserKnifeInout;

/**
 * 刀具编号VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class UseInventoryUserKnifeInoutVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 编号
     */
    private String code;

    /**
     * useInventoryUserId
     */
    private Long useInventoryUserId;

    /**
     * 领新id
     */
    private Long cellInventoryInoutId;

    /**
     * 状态
     */
    private UseInventoryUserKnifeInout.Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status.getDesc();
    }

    /**
     * SKU编号
     */
    private String skuCode;

    /**
     * useInventoryInoutId
     */
    private Long useInventoryInoutId;

    /**
     * deviceCode
     */
    private String deviceCode;

    /**
     * 暂存id
     */
    private Long storageInventoryUserId;

    /**
     * storageInventoryInoutId
     */
    private Long storageInventoryInoutId;

    private Long checkInventoryInoutId;

    private Long checkResultId;

    private UseInventoryUserKnifeInout.BusinessType businessType;


    private String businessTypeDesc;

    public String getBusinessTypeDesc(){
        if (businessType!=null){
            return businessType.getDesc();
        }
        return "";
    }

    private Long storageInventoryCheckId;

    private Long workOrderId;

    /**
     * 企业编码
     */
    private String enterpriseCode;


    private String cabCode;

    private String spaceCode;

    private Integer remainingTime;

    private Integer initTime;

    private Integer useTime;

    /**
     * 寿命单位  1：小时/ 2：次数
     */
    private UseInventoryUserKnifeInout.LifeUnit lifeUnit;

    private Integer preTime;

    private Long categoryId;

    private Long processId;

    private BigDecimal price;
}
